home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_crate_puzzle.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  129 lines

  1. # Jones 3D Cog Script
  2. #
  3. # VOL_Crate_Puzzle.cog
  4. #
  5. # This elevator will come down to frame one, sleep, then return to frame 0.
  6. #
  7. # [CM]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     
  14.     
  15. #...............MESSAGES..............
  16.     message  startup
  17.     message  entered
  18.     message  activated
  19.     
  20.  
  21. #...............ACTORS..............
  22.     thing    player                                            local
  23.  
  24. #...............TRIGGERS..............
  25.     surface    freesurf                                        mask=0x80         
  26.     sector    cuesect0                                        linkID=2             
  27.     sector    cuesect1                                         linkID=2
  28.     
  29.  
  30.  
  31. #...............PROPS..............
  32.     thing    lid         
  33.     thing    crate1            
  34.     thing    container            
  35.     thing    block_tack            
  36.     thing    cam1            
  37.     thing    curCam                                            local            
  38.     thing    ActivatePlate                                                    
  39.  
  40.     
  41. #...............SOUNDS..............
  42.     sound   swing=nub_sarc_close_c.wav                        local
  43.     sound   in_whathavewe=INXJ002.wav                        local
  44.     sound   in_spare=INXJ170.WAV                            local
  45.     sound   com_cue=mus_gen_russremin1.wav                    local
  46.  
  47.  
  48. #...............VARIABLES..............
  49.     int        supriseline=0                                    local        
  50.     int        lidflip=0                                        local        
  51.     int        cueplayed=0                                        local        
  52.  
  53. end
  54.  
  55. # ========================================================================================
  56. code
  57. startup:
  58.  
  59.     player=GetLocalPlayerThing();
  60. return;
  61.  
  62. # ========================================================================================
  63. entered:
  64.  
  65.     If ((GetSenderRef() == container) && (supriseline == 0))
  66.         {
  67.         If (lidflip == 0) return;
  68.         PlayVoice(player, in_whathavewe, 1.0, 0);
  69.         supriseline = 1;
  70.         }
  71.  
  72.     
  73.     If (GetSenderRef() == freesurf) 
  74.         {
  75.         If (GetSourceRef() != crate1) return;
  76.         SetActorFlags(player, 0x200000);
  77.         StartCutscene(1);
  78.         Sleep(0.25);
  79.         curCam = GetCurrentCamera();
  80.         SetCameraSecondaryFocus(2, block_tack);
  81.         SetCameraFocus(2, cam1);
  82.         SetCurrentCamera(2);
  83.         SetCameraFOV(90, 0, 0);
  84.         SetCameraFOV(70, 1, 1.0);
  85.         Sleep(.25);
  86.         Rotate(lid, 90, 0, .75);
  87.         PlaySoundThing(swing, lid, 1.0, 15, 20, 0x0);
  88.         Sleep(1.0);
  89.         lidflip = 1;
  90.             
  91.         EndCutscene();
  92.         ClearActorFlags(player, 0x200000);
  93.         SetCurrentCamera(curCam);
  94.         SetCameraFOV(90, 0, 0);
  95.         }
  96.  
  97.     
  98.     If ((GetSenderID() == 2) && (cueplayed == 0))
  99.         {
  100.         cueplayed = 1;
  101.         PlaySoundLocal(com_cue, 1.0, 0.0, 0x0, 0);
  102.         }
  103.     
  104.     
  105. return;
  106.  
  107. # ========================================================================================
  108. activated:
  109.  
  110.     If (GetSenderRef() == ActivatePlate)
  111.     {
  112.         SetActorFlags(player, 0x200000);
  113.         PlayMode(player, 60, 0);
  114.         Sleep(0.5);
  115.         DestroyThing(block_tack);
  116.         DestroyThing(ActivatePlate);
  117.         # ADD AN ANIMATION HERE
  118.         PlayVoice(player, in_spare, 1.0, 0);
  119.         ChangeInv(player, 107, 1);
  120.         JonesInvItemChanged(107);
  121.         ClearActorFlags(player, 0x200000);
  122.     }
  123. return;
  124.  
  125. # ========================================================================================
  126. end
  127.  
  128.  
  129.